Osteoarthritis (OA) management remains challenging because of its intricate pathogenesis. Intra-articular injections of drugs, such as glucocorticoids and hyaluronic acid (HA), have certain limitations, including the risk of joint infection, pain, and swelling. Hydrogel-based therapeutic strategies have attracted considerable attention because of their enormous therapeutic potential. Herein, a supramolecular nanofiber hydrogel is developed using dexamethasone sodium phosphate (DexP) as a vector to deliver lentivirus-encoding hyaluronan synthase 2 (HAS2) (HAS2@DexP-Gel). During hydrogel degradation, HAS2 lentivirus and DexP molecules are slowly released. Intra-articular injection of HAS2@DexP-Gel promotes endogenous HA production and suppresses synovial inflammation. Additionally, HAS2@DexP-Gel reduces subchondral bone resorption in the anterior cruciate ligament transection-induced OA mice, attenuates cartilage degeneration, and delays OA progression. HAS2@DexP-Gel exhibited good biocompatibility both in vitro and in vivo. The therapeutic mechanisms of the HAS2@DexP-Gel are investigated using single-cell RNA sequencing. HAS2@DexP-Gel optimizes the microenvironment of the synovial tissue by modulating the proportion of synovial cell subpopulations and regulating the interactions between synovial fibroblasts and macrophages. The innovative nanofiber hydrogel, HAS2@DexP-Gel, effectively enhances endogenous HA production while reducing synovial inflammation. This comprehensive approach holds promise for improving joint function, alleviating pain, and slowing OA progression, thereby providing significant benefits to patients.